// axios  前后端交互约定的错误码统一处理
import { useMessage } from '@/hook/useMessage';
import type { AxiosResponseDataInterface } from './axiosInterface';
export const promiseErrorCodeType = function (
  // 约定的接口类型
  responseDataResult: AxiosResponseDataInterface,
): void {
  useMessage({
    type: 'error',
    message: `操作异常,错误码:${responseDataResult.code},错误信息:${responseDataResult.msg}`,
  });
};
